package com.sunlands.zlcx.usercenter.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @author anjl
 */
@ApiModel(value = "token信息", description = "为了和其他框架兼容, 保持spring-oauth原生的格式, 返回内容使用带有下划线的属性名")
@Data
public class AccessTokenVO implements Serializable {

    private static final long serialVersionUID = 2837320505278556451L;
    @JsonProperty("access_token")
    @ApiModelProperty(position = 1, value = "token字符串")
    private String accessToken;

    @JsonProperty("token_type")
    @ApiModelProperty(position = 2, value = "token类型, 一般都是Bearer, 使用token的时候加入Bearer前缀")
    private String tokenType;

    @JsonProperty("refresh_token")
    @ApiModelProperty(position = 3, value = "用来刷新token")
    private String refreshToken;

    @JsonProperty("expires_in")
    @ApiModelProperty(position = 4, value = "过期时间, 单位:秒", example = "-1")
    private Integer expiresIn;

    @ApiModelProperty(position = 5, value = "用户所赋予的scope, 消费token的时候可能会检查")
    private String scope;

}